rgw: sanitize newlines in s3 CORSConfiguration's ExposeHeader
authorCasey Bodley <cbodley@redhat.com>
Tue, 26 May 2020 19:03:03 +0000 (15:03 -0400)
committerBastien Roucariès <rouca@debian.org>
Sat, 21 Oct 2023 16:42:26 +0000 (17:42 +0100)
commit3b43f29ad27324d3b0873f64623a2ef60db01f66
tree6040f37826d117ba5be40245a949cde3dac06b96
parent2332b9582bca4326cc6043ca6c497cc8d40311ec
rgw: sanitize newlines in s3 CORSConfiguration's ExposeHeader

the values in the <ExposeHeader> element are sent back to clients in a
Access-Control-Expose-Headers response header. if the values are allowed
to have newlines in them, they can be used to inject arbitrary response
headers

this issue only affects s3, which gets these values from an xml document

in swift, they're given in the request header
X-Container-Meta-Access-Control-Expose-Headers, so the value itself
cannot contain newlines

Signed-off-by: Casey Bodley <cbodley@redhat.com>
Reported-by: Adam Mohammed <amohammed@linode.com>
Origin: upstream, https://github.com/ceph/ceph/pull/35773

Gbp-Pq: Name CVE-2020-10753.patch
src/rgw/rgw_cors.cc